<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Users extends Model {

	//
	protected $table = 'users';


	public function poweruser()
	{
		return $this->hasOne('App\Models\EnterpricePowerusersBase', 'uid', 'id');
	}

	public function energysaver()
	{
		return $this->hasOne('App\Models\EnterpriceEnergysaverBase', 'uid', 'id');
	}

	public function devicetech()
	{
		return $this->hasOne('App\Models\DevicetechProviderBase', 'uid', 'id');
	}

	public function thirdparty()
	{
		return $this->hasOne('App\Models\ThirdpartyBase', 'uid', 'id');
	}

	public function government()
	{
		return $this->hasOne('App\Models\GovernmentBase', 'uid', 'id');
	}

	public function association()
	{
		return $this->hasOne('App\Models\AssociationBase', 'uid', 'id');
	}

	public function profile()
	{
		return $this->hasOne('App\Models\UserProfile', 'uid', 'id');
	}

	public function userRole()
	{
		return $this->hasOne("App\Models\UserRoles", "id", "role_id");
	}

	public function cellphone()
	{
		return $this->hasOne("App\Models\Cellphone", "uid", "id");
	}

	public function email()
	{
		return $this->hasOne("App\Models\Email", "uid", "id");
	}
}
